package com.zmn.plat.model.vo.part;

import com.zmn.common.utils.amount.AmountUtil;

import java.util.Date;
import java.util.Objects;


/**
 * 类描述： PartSkuVO
 *
 * @author DaiZhichao
 * @since 2018/12/3 20:34
 */
public class PartSkuVO {
    private Integer skuId;
    private Integer companyId;
    private String name;
    private String factoryName;
    private String pinyin;
    private String fullName;
    private Integer categOneId;
    private Integer categId;
    private String imgSrc;
    private String imgSrc2;
    private String imgSrc3;
    private String imgSrc4;
    private Integer brandId;
    private String unit;
    private String packSpec;
    private Integer sort;
    private Short status;
    private String creater;
    private String updater;
    private Date createTime;
    private Date updateTime;

    /**
     * lay行数
     */
    private Integer layIndex;

    /**
     * 状态名称
     */
    private String statusName;
    /**
     * 公司名称
     */
    private String companyName;
    /**
     * 一级分类名
     */
    private String categOneName;
    /**
     * 二级分类名
     */
    private String categName;
    /**
     * 配件品牌名
     */
    private String brandName;


    /**
     * PRICE
     */
    private Long price;
    private Long hqPurchasePrice;
    private Long subPurchasePrice;

    /**
     * 产品分类，1家电，2非家电
     */
    private Integer productType;

    public String getPriceStr() {
        if (Objects.isNull(this.price)){
            this.price = 0L;
        }
        return AmountUtil.fen2Yuan(this.price).toString();
    }

    public void setPriceStr(String priceStr) {
        if (Objects.isNull(priceStr)){
            priceStr = "0";
        }
        this.price = AmountUtil.yuan2FenLong(priceStr);
    }

    public String getHqPurchasePriceStr() {
        if (Objects.isNull(this.hqPurchasePrice)){
            this.hqPurchasePrice = 0L;
        }
        return AmountUtil.fen2Yuan(this.hqPurchasePrice).toString();
    }

    public void setHqPurchasePriceStr(String hqPurchasePriceStr) {
        if (Objects.isNull(hqPurchasePriceStr)){
            hqPurchasePriceStr = "0";
        }
        this.hqPurchasePrice = AmountUtil.yuan2FenLong(hqPurchasePriceStr);
    }

    public String getSubPurchasePriceStr() {
        if (Objects.isNull(this.subPurchasePrice)){
            this.subPurchasePrice = 0L;
        }
        return AmountUtil.fen2Yuan(this.subPurchasePrice).toString();
    }

    public void setSubPurchasePriceStr(String subPurchasePriceStr) {
        if (Objects.isNull(subPurchasePriceStr)){
            subPurchasePriceStr = "0";
        }
        this.subPurchasePrice = AmountUtil.yuan2FenLong(subPurchasePriceStr);
    }

    public Integer getProductType() {
        return productType;
    }

    public void setProductType(Integer productType) {
        this.productType = productType;
    }

    public String getPinyin() {
        return pinyin;
    }

    public void setPinyin(String pinyin) {
        this.pinyin = pinyin;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public Long getPrice() {
        return price;
    }

    public void setPrice(Long price) {
        this.price = price;
    }

    public Long getHqPurchasePrice() {
        return hqPurchasePrice;
    }

    public void setHqPurchasePrice(Long hqPurchasePrice) {
        this.hqPurchasePrice = hqPurchasePrice;
    }

    public Long getSubPurchasePrice() {
        return subPurchasePrice;
    }

    public void setSubPurchasePrice(Long subPurchasePrice) {
        this.subPurchasePrice = subPurchasePrice;
    }

    public Integer getSkuId() {
        return skuId;
    }

    public void setSkuId(Integer skuId) {
        this.skuId = skuId;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFactoryName() {
        return factoryName;
    }

    public void setFactoryName(String factoryName) {
        this.factoryName = factoryName;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public Integer getCategOneId() {
        return categOneId;
    }

    public void setCategOneId(Integer categOneId) {
        this.categOneId = categOneId;
    }

    public Integer getCategId() {
        return categId;
    }


    public void setCategId(Integer categId) {
        this.categId = categId;
    }

    public String getImgSrc() {
        return imgSrc;
    }


    public void setImgSrc(String imgSrc) {
        this.imgSrc = imgSrc;
    }


    public String getImgSrc2() {
        return imgSrc2;
    }


    public void setImgSrc2(String imgSrc2) {
        this.imgSrc2 = imgSrc2;
    }


    public String getImgSrc3() {
        return imgSrc3;
    }


    public void setImgSrc3(String imgSrc3) {
        this.imgSrc3 = imgSrc3;
    }


    public String getImgSrc4() {
        return imgSrc4;
    }


    public void setImgSrc4(String imgSrc4) {
        this.imgSrc4 = imgSrc4;
    }


    public Integer getBrandId() {
        return brandId;
    }


    public void setBrandId(Integer brandId) {
        this.brandId = brandId;
    }


    public String getUnit() {
        return unit;
    }


    public void setUnit(String unit) {
        this.unit = unit;
    }


    public String getPackSpec() {
        return packSpec;
    }


    public void setPackSpec(String packSpec) {
        this.packSpec = packSpec;
    }


    public Integer getSort() {
        return sort;
    }


    public void setSort(Integer sort) {
        this.sort = sort;
    }


    public Short getStatus() {
        return status;
    }


    public void setStatus(Short status) {
        this.status = status;
    }


    public String getCreater() {
        return creater;
    }


    public void setCreater(String creater) {
        this.creater = creater;
    }


    public String getUpdater() {
        return updater;
    }


    public void setUpdater(String updater) {
        this.updater = updater;
    }


    public Date getCreateTime() {
        return createTime;
    }


    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }


    public Date getUpdateTime() {
        return updateTime;
    }


    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getCategOneName() {
        return categOneName;
    }

    public void setCategOneName(String categOneName) {
        this.categOneName = categOneName;
    }

    public String getCategName() {
        return categName;
    }

    public void setCategName(String categName) {
        this.categName = categName;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public Integer getLayIndex() {
        return layIndex;
    }

    public void setLayIndex(Integer layIndex) {
        this.layIndex = layIndex;
    }

    @Override
    public String toString() {
        return "PartSkuVO{" +
                "skuId=" + skuId +
                ", companyId=" + companyId +
                ", name='" + name + '\'' +
                ", factoryName='" + factoryName + '\'' +
                ", pinyin='" + pinyin + '\'' +
                ", fullName='" + fullName + '\'' +
                ", categOneId=" + categOneId +
                ", categId=" + categId +
                ", imgSrc='" + imgSrc + '\'' +
                ", imgSrc2='" + imgSrc2 + '\'' +
                ", imgSrc3='" + imgSrc3 + '\'' +
                ", imgSrc4='" + imgSrc4 + '\'' +
                ", brandId=" + brandId +
                ", unit='" + unit + '\'' +
                ", packSpec='" + packSpec + '\'' +
                ", sort=" + sort +
                ", status=" + status +
                ", creater='" + creater + '\'' +
                ", updater='" + updater + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", layIndex=" + layIndex +
                ", statusName='" + statusName + '\'' +
                ", companyName='" + companyName + '\'' +
                ", categOneName='" + categOneName + '\'' +
                ", categName='" + categName + '\'' +
                ", brandName='" + brandName + '\'' +
                ", price=" + price +
                ", hqPurchasePrice=" + hqPurchasePrice +
                ", subPurchasePrice=" + subPurchasePrice +
                '}';
    }
}
